package com.aaa.entity;

import com.aaa.ann.ColumnAnn;
import com.aaa.ann.EntityAnn;
import com.aaa.dao.MyDao;
import com.aaa.dao.impl.MyDaoImpl;

import java.io.Serializable;

/**
 * (Userinfo)实体类
 *
 * @author
 * @since 2022-06-15 11:13:36
 */
@EntityAnn(tableName = "userinfo")
public class Userinfo implements Serializable {
    private static final long serialVersionUID = 876662685610948602L;

    @ColumnAnn(colName = "userid")
    private Integer userid;
    @ColumnAnn(colName = "username")
    private String username;
    @ColumnAnn(colName = "password")
    private String password;
    @ColumnAnn(colName = "salt")
    private String salt;
    @ColumnAnn(colName = "deptid")
    private Integer deptid;
    @ColumnAnn(colName = "avatar")
    private String avatar;

    public Userinfo() {
    }

    public Userinfo(Integer userid, String username, String password, String salt, Integer deptid, String avatar) {
        this.userid = userid;
        this.username = username;
        this.password = password;
        this.salt = salt;
        this.deptid = deptid;
        this.avatar = avatar;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Integer getDeptid() {
        return deptid;
    }

    public void setDeptid(Integer deptid) {
        this.deptid = deptid;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }


    public static void main(String[] args) throws Exception {
        MyDao<Userinfo> userinfoMyDao = new MyDaoImpl<Userinfo>();
        Userinfo userinfo= new Userinfo(103,"abcd","fdsaf","fdsaf",10,"fdsf");
        userinfoMyDao.saveEntity(userinfo);
    }
}

